/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.RemoteException;
import java.util.List;

import middleware.datacontainer.searchclient.ExemplarContainer;
import middleware.datacontainer.searchmedium.MediumContainer;
import application.controller.server.UseCaseControllerMediumSearch;
import application.exceptions.ExemplarNotFoundException;
import application.exceptions.MediumNotFoundException;

/**
 * The Class MediumSearchRemoteImpl.
 */
public class MediumSearchRemoteImpl extends AbstractRemoteImpl implements
		MediumSearchRemote {
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1534520043005272256L;
	
	/** The _controller. */
	UseCaseControllerMediumSearch _controller;

	/**
	 * Instantiates a new medium search remote impl.
	 * 
	 * @throws RemoteException
	 *             the remote exception
	 */
	public MediumSearchRemoteImpl() throws RemoteException {
		super();
		_controller = new UseCaseControllerMediumSearch();
	}

	/* (non-Javadoc)
	 * @see application.server.MediumSearchRemote#searchMedium(java.lang.String)
	 */
	public List<MediumContainer> searchMedium(String searchText)
			throws RemoteException {
		return _controller.searchMedium(searchText);
	}

	/* (non-Javadoc)
	 * @see application.server.MediumSearchRemote#getExemplars(java.lang.Integer)
	 */
	@Override
	public List<ExemplarContainer> getExemplars(Integer mediumID)
			throws RemoteException, MediumNotFoundException,
			ExemplarNotFoundException {
		return _controller.getExemplars(mediumID);
	}
}
